<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "image".
 *
 * @property integer $id
 * @property string $location
 * @property string $name
 * @property string $type
 * @property string $img_url
 * @property string $create_date
 * @property string $update_date
 * @property integer $version
 * @property integer $author_id
 */
class Image extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'image';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['location', 'name', 'img_url', 'create_date', 'update_date', 'author_id'], 'required'],
            [['create_date', 'update_date'], 'safe'],
            [['version', 'author_id'], 'integer'],
            [['location', 'img_url'], 'string', 'max' => 256],
            [['name'], 'string', 'max' => 128],
            [['type'], 'string', 'max' => 64],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'location' => 'Location',
            'name' => 'Name',
            'type' => 'Type',
            'img_url' => 'Img Url',
            'create_date' => 'Create Date',
            'update_date' => 'Update Date',
            'version' => 'Version',
            'author_id' => 'Author ID',
        ];
    }
}
